Texture InputTexture;

float2 center;
float radius;
float4 color = {1.0,1.0,1.0,1.0};
float2 textureSize;

sampler inputTexture = sampler_state 
{ 
    texture = <InputTexture>; 
    magfilter = LINEAR; 
    minfilter = LINEAR; 
    mipfilter = LINEAR; 
};
 
struct VS_OUTPUT
{
	float4 Position	: POSITION;
	float2 TexCoords : TEXCOORD0;
};
 
float4 DrawCircle_PS (VS_OUTPUT Input) : COLOR0
{
	float4 tColor = tex2D(inputTexture, Input.TexCoords);
	
	float x = center.x;
	float y = center.y;
	float a = Input.TexCoords.x * textureSize.x;
	float b = Input.TexCoords.y * textureSize.y;
	
	if((((x-a)*(x-a)) + ((y-b)*(y-b))) <= radius*radius)
		return color;
	else
		return tColor;
}
 
technique DrawCircle
{
	pass P0
	{
		PixelShader = compile ps_3_0 DrawCircle_PS();
	}
}